1. Field of the Invention
The present invention relates generally to an improved data processing system and in particular to a computer implemented method and apparatus for managing data. Still more particularly, the present invention relates to a computer implemented method, apparatus, and computer usable program code for managing changes in databases.
2. Description of the Related Art
A database typically contains a relational database, which appears to a user as a set of user-defined tables. A table contains rows and columns. A column contains a name and data type, and a row is a record of data values entered for the columns. With this type of database, a catalog or dictionary is present to define these tables, as well as indexes and views of the tables. Additionally, relationships between the tables plus data entered by the users may be cataloged.
Typically, a database may be frequently subject to a series of changes resulting from upgrades, debugging, and expansions of the product. When these changes occur, the database has to be updated to reflect the changes.
One known system for propagating changes in a database is structured query language (SQL) data definition language (DDL). This system is provided natively by most relational databases and is used to change the database. With this type of system, a number of drawbacks are present. Data definition language implementations vary widely among different databases making the process very vendor specific. Further, constructing a data definition language manually is error prone and the statements in this type of system are limited.
Additionally, a number of steps may be required before the change can be made. As an example, in making a simple change to a table, the entire table may be dropped and recreated. Further, additional steps may be required after executing the data definition language. A change may result in other database entities being placed into an invalid or inoperative state requiring additional data definition language operations to resolve these cascading effects.
Other solutions that have been used employ using proprietary extensions on top of sequential query language systems. Change definition language (CDL) is an example of a solution using a proprietary extension. This type of language is used to represent structural changes in processes to change a database structure. These types of extended languages also have limitations. For example, the solution is context dependent on a specific database at a particular point in time. Therefore, it is not easily integrated throughout an entire enterprise with modification.
Further, this solution typically performs an error validation step and requires error resolution before the language can be processed to change the database. These steps are required because the database cannot represent invalid structures. These structures are less reusable between database vendors because vendor data definition language languages are not identical.
Also, some systems are used to aggregate changes as they are made. Unfortunately, many ways exist to change a database, making it increasingly likely that changes will be made without being aggregated using these types of tools. Another disadvantage of using the aggregation is the possibility of recording duplicate change records.
Using data definition language alone requires detailed knowledge of the capabilities of the data definition language and the limitations of the particular database. For example, all dependent objects must be dropped before a user defined type can be changed in some databases. Further, structured query language extended languages simplifies change in a column type. This type of system, however, does not represent every atomic change a database administrator might like to make. If such atomic changes could be represented, this type of system would be so complex that it would be impractical to use. Additionally, reducing the dependency on the particular database in the particular state means that less customization is present for the user.
Therefore, it would be advantageous to have an improved computer implemented method, apparatus, and computer usable program code for managing database changes.